package noobteam.deartrainer.service;

import noobteam.deartrainer.mapper.AdministratorInfoMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @Author 赵崇轩
 * @Date 2021/6/25 16:37
 * @Version 1.0
 */
@Service
public class AdministratorInfoService {

    @Resource
    private AdministratorInfoMapper administratorInfoMapper;

    public List<Map<String,Object>> getName(){
        List<Map<String,Object>> list = null;
        try {
            list = administratorInfoMapper.selectName();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return list;
    }

    public Map<String,Object> getUserPassWordByName(String str){
        Map<String, Object> map = null;
        try {
            map = administratorInfoMapper.selectPasswordByName(str);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return map;
    }

    public Map<String,Object> getAdminInfoByName(String str){
        Map<String, Object> map = null;
        try {
            map = administratorInfoMapper.findAdminByName(str);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return map;
    }
}
